package com.ws.entity;

import lombok.Data;

/**
 * @author 王硕
 * @version jdk21
 * @className SalariedEmployee
 * @description
 * @date 2024/11/7 21:55
 */
public class SalariedEmployee extends Employee{
    private double monthlySalary;

    public SalariedEmployee(String name, int birthdayMonth, double monthlySalary) {
        super(name, birthdayMonth);
        this.monthlySalary = monthlySalary;
    }
    @Override
    public double getSalary(int month) {
        double baseSalary = super.getSalary(month) + monthlySalary;
        return baseSalary;
    }

    public double getMonthlySalary() {
        return monthlySalary;
    }
}
